/*
 * FileName：ReplyKeywordMapper.java 
 * <p>
 * Copyright (c) 2017-2020 <a href="https://www.smartwx.info">hermit(1154808491@qq.com)</a>.
 * <p>
 * Licensed under the GNU General Public License, Version 3 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 * <p>
 * http://www.gnu.org/licenses/gpl-3.0.html
 * <p>
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * 
 */
package com.smart.wx.wxcms.dao;

import java.util.List;

import org.apache.ibatis.annotations.Param;

import com.smart.common.IBase;
import com.smart.wx.wxcms.entity.ReplyKeyword;

/**
 * @author hermit
 * @version 2.0
 * @date 2018-07-25 09:40:03
 */
public interface ReplyKeywordMapper extends IBase<ReplyKeyword> {
	/**
	 * 通过key查询数据--主要查询可是否存在
	 * @param key
	 * @param account
	 * @return
	 */
	List<ReplyKeyword> queryListByKey(@Param ("key") String key ,
			  @Param("account")String account);
	/**
	 * 通过key 删除单条数据
	 * @param key
	 * @param account
	 */
	void deleteByKey(@Param("key") String key ,
			  @Param("account")String account);
	/**
	 * 通过规则主键删除所有的关键字数据
	 * @param kId
	 */
	void deleteByKid(@Param("kId") String kId);
	/**
	 * 通过规则表主键批量删除关键字表数据
	 * @param list
	 */
	void deleteByBatchKid(@Param ("list") List<String> list);
	
	void delete(int id);

	/**
	 * 根据微信公众号删除记录
	 * @return
	 */
	Integer deleteByAccount(@Param("account")String account);
}
